﻿using System.ComponentModel;
using Flux.Data;

namespace Flux.Editor.ViewModels.PropertyViewModels
{
	public class ProjectPropertyViewModel
		: PropertyViewModel<Project>
	{
		[Category("General")]
		[DisplayName(@"Name")]
		[Description("The projects name")]
		public string Name
		{
			get { return DataContext.Name; }
			set
			{
				DataContext.Name = value;
				NotifyPropertyChanged();
			}
		}

		[Category("Appearence")]
		[DisplayName(@"Tile Width")]
		[Description("The width of the individual tiles in pixels")]
		public int TileWidth
		{
			get { return DataContext.TileWidth; }
			set
			{
				DataContext.TileWidth = value;
				NotifyPropertyChanged();
			}
		}

		[Category("Appearence")]
		[DisplayName(@"Tile Height")]
		[Description("The height of the individual tiles in pixels")]
		public int TileHeight
		{
			get { return DataContext.TileHeight; }
			set
			{
				DataContext.TileHeight = value;
				NotifyPropertyChanged();
			}
		}

		public ProjectPropertyViewModel() {  }

		public ProjectPropertyViewModel(object project)
		{
			DataContext = (Project)project;
		}
	}
}